__author__ = 'Forcs'

import wancake.config as wc_config

class WancakeDbRouter(object):

    def db_for_read(self, model, **hint):
        if model._meta.app_label == wc_config.DATABASE:
            return "default"
        return "default"

    def db_for_write(self, model, **hint):
        if model._meta.app_label == wc_config.DATABASE:
            return "default"
        return "default"

    def allow_relation(self, obje1, obje2, **hint):
        return True

    def allow_migrate(self, db, app_label, model=None, **hint):
        if app_label == wc_config.DATABASE:
            return db == "default"
        return None
